package br.com.fogas.webservice.service.impl;

import android.content.Context;
import br.com.fogas.utils.exception.ParseXmlException;
import br.com.fogas.webservice.exception.ERaiseWebServiceException;
import br.com.fogas.webservice.exception.RespostaWebServiceException;
import br.com.fogas.webservice.exception.SemConexaoInternetException;
import br.com.fogas.webservice.exception.ServidorForaException;
import br.com.fogas.webservice.exception.TempoEsperaRespostaException;
import br.com.fogas.webservice.exception.WebServiceException;
import br.com.fogas.webservice.parser.datahora.DataHoraServidorResponse;
import br.com.fogas.webservice.repository.IRepositoryHandler;
import br.com.fogas.webservice.repository.soap.PingServidorRepository;
import br.com.fogas.webservice.service.IServiceHandler;

public class PingServidorService implements IServiceHandler<DataHoraServidorResponse>{

	private IRepositoryHandler<DataHoraServidorResponse> repository;
	
	public PingServidorService(Context context) {
		this.repository = new PingServidorRepository(context);
	}
	
	@Override
	public DataHoraServidorResponse getResponse()
			throws SemConexaoInternetException, ParseXmlException,
			TempoEsperaRespostaException, ServidorForaException,
			RespostaWebServiceException, WebServiceException,
			ERaiseWebServiceException {
		return repository.getResponse();
	}
}
